<%--
  Created by IntelliJ IDEA.
  User: Aaking-aline
  Date: 2022-04-07
  Time: 10:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>注册页</title>
</head>
<body>
    <center>
        <form id="form1" action="RegisterServlet" method="post">
            <input type="text" placeholder="请输入注册用户名" name="username">  <br>
            <input id="pass1" type="password" placeholder="请输入注册密码" name="password"> <br>
            <input id="pass2" type="password" placeholder="请再次输入注册密码" > <br>
            <input id="btn" type="button" value="注册">
        </form>


    </center>
</body>

<script>
    document.getElementById("btn").onclick = function() {
    	if(document.getElementById("pass1").value == document.getElementById("pass2").value){
			document.getElementById("form1").submit();
			return ;
        }
    	alert("两次密码不一样 请重新输入");
    }
</script>
</html>
